package com.tidc.consumer8001.service;

import com.tidc.api.pojo.UserOV;
import com.tidc.api.pojo.user.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @ClassNmae UserManagerService
 * @Description TODO
 * @Author 冯涛滔
 **/
public interface UserManagerService {
	/**
	 * 注册一个账号
	 * @param teacher
	 * @return
	 */
	UserOV register(User teacher);

	/**
	 * 开关老师的权限
	 * @param teacher email
	 * @return
	 */
	UserOV switchTeacher(User teacher,HttpServletRequest req);

	/**
	 * @param email
	 * @return 根据邮箱号返回用户详细信息
	 */
	@GetMapping("/user/info")
	UserOV userInfo(String email);

	/**
	 * 根据学校id查询该学校的所有学生
	 * @param req
	 * @return
	 */
	UserOV<List<User>> listSchoolStudent(HttpServletRequest req);

	/**
	 * 使用学生id查询他们的email
	 * @param list
	 * @return
	 */
	UserOV<List<String>> listStudentEmail(List<Integer> list);

	/**
	 * 使用email查看student信息
	 * @param email
	 * @return
	 */
	UserOV<User> getStudent(String email);

}
